package org.eenie.appseed.net.api

import org.eenie.appseed.net.config.NetExecutor
import org.eenie.appseed.net.model.BannerInfo
import org.eenie.appseed.net.model.PaginationData
import rxhttp.wrapper.param.toAwaitApiResponse


class IndexApi {


    suspend fun fetchBanner(): PaginationData<BannerInfo> {
        return NetExecutor.get("https://www.wanandroid.com/article/list/0/json")
            .toAwaitApiResponse<PaginationData<BannerInfo>>()
            .await()
    }


}